<HTML><HEAD><TITLE>display(+Stream, ?Term)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Term I/O</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>display(+Stream, ?Term)</H1>
Term is displayed on the output stream Stream --- without considering
operator definitions.


<DL>
<DT><EM>Stream</EM></DT>
<DD>Integer (stream number) or Atom (reserved or user-defined                symbolic stream name).
</DD>
<DT><EM>Term</EM></DT>
<DD>Prolog term.
</DD>
</DL>
<H2>Description</H2>
   Used to display an expression in standard parenthesised prefix notation,
   onto the output stream Stream.

<P>
   Note that as usual, the output is buffered, so it may need to be flushed
   either by closing the stream, by writing again or by using flush/1.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>display(+, ?) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Stream is not instantiated.
<DT><EM>(5) type error </EM>
<DD>Stream is not an atom or an integer.
<DT><EM>(192) illegal stream mode </EM>
<DD>Stream is not an output stream.
<DT><EM>(193) illegal stream specification </EM>
<DD>Stream is an illegal stream specification.
</DL>
<H2>Examples</H2>
<PRE>
Success:
      display(output, 3.0).                % displays 3.0
      set_stream(a,output), display(a,hi). % displays hi

      [eclipse]: open(file1,update,S), display(S, X+2), close(S).
      X = _72
      S = 6
      yes.
      [eclipse]: sh('cat file1').
      +(_98, 2)
      yes.
Error:
      display(S, a(b,c)).        (Error 4).
      display("string", a(b,c)). (Error 5).
      display(9, X=2).           (Error 192). % stream not open
      display(atom, X=2).        (Error 193).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/ioterm/display-1.html">display / 1</A>, <A HREF="../../kernel/ioterm/write-1.html">write / 1</A>, <A HREF="../../kernel/ioterm/write-2.html">write / 2</A>
</BODY></HTML>
